<script>

Person.prototype.getName = function(){
    console.log(this.name)
}
function Person(name,age){
    this.name = name
    this.age = age
}

function Student(name,age,sex){
    Person.call(this,name,age)
    this.sex = sex
}
for(var prop in Person.prototype){
    Student.prototype[prop] = Person.prototype[prop]
}
var student = new Student('gailun',44,'male')

//每次构造函数都要走一个函数
</script>